#include<bits/stdc++.h>
using namespace std;
template<typename T>inline void read(T &x){
	x=0;int f=1;char c=getchar();
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	x*=f;
}
const int N=1e6+5,mod=1e9+7;
int n,k,a[N],c[N];
inline int Inv(int x){
	int ans=1;
	for(int y=mod-2;y;y>>=1,x=1ll*x*x%mod) if(y&1) ans=1ll*ans*x%mod;
	return ans;
}
int main(){
	freopen("game.in","r",stdin);
	freopen("game.out","w",stdout);
	read(n),read(k);
	for(int i=1;i<=n;++i) read(a[i]);
	c[1]=1;
	for(int i=1;i<=k;++i) c[1]=1ll*(n-i)*c[1]%mod;
	int hou=1;
	for(int i=1;i<=k;++i) hou=1ll*hou*(n-i-2)%mod;
	for(int i=3;i<=n;++i) c[i]=hou;
	int mul=1;
	for(int i=1;i<=k;++i) mul=1ll*mul*(n-i-1)%mod;
	c[2]=(1ll*mul-(c[1]-mul)%mod+mod)%mod;
	int ans=0;
	for(int i=1;i<=n;++i) (ans+=1ll*a[i]*c[i]%mod)%=mod;
	cout<<1ll*ans*Inv(c[1])%mod;
	return 0;
}

